package com.hhf.rpc.provider;

import com.hhf.rpc.common.service.UserService;
import com.hhf.rpc.core.RpcApplication;
import com.hhf.rpc.core.bootstrap.ProviderBootstrap;
import com.hhf.rpc.core.config.RegistryConfig;
import com.hhf.rpc.core.config.RpcConfig;
import com.hhf.rpc.core.model.ServiceMetaInfo;
import com.hhf.rpc.core.model.ServiceRegisterInfo;
import com.hhf.rpc.core.registry.LocalRegistry;
import com.hhf.rpc.core.registry.Registry;
import com.hhf.rpc.core.registry.RegistryFactory;
import com.hhf.rpc.core.server.HttpServer;
import com.hhf.rpc.core.server.impl.VertxHttpServer;
import com.hhf.rpc.core.server.impl.VertxTcpServer;
import com.hhf.rpc.provider.service.UserServiceImpl;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author hhf
 * @Date 2024/10/15
 * @Description
 */
public class ProviderExample {

    public static void main(String[] args) {

        //要注册的服务
        List<ServiceRegisterInfo> serviceRegisterInfoList = new ArrayList<>();
        ServiceRegisterInfo serviceRegisterInfo = new ServiceRegisterInfo(UserService.class.getName(), UserServiceImpl.class);
        serviceRegisterInfoList.add(serviceRegisterInfo);

        //服务提供者初始化
        ProviderBootstrap.init(serviceRegisterInfoList);


    }
}
